-- GENERATED SPELL FOR [Nether Scryer] --


function spell0_20045(pUnit, Event) --@Arcane Blast,n/a--
pUnit:FullCastSpellOnTarget(37126,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20045', 530, 1)
end

function spell1_20045(pUnit, Event) --@Domination,n/a--
pUnit:FullCastSpellOnTarget(37135,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20045', 8297, 1)
end

function Sorts_20045(pUnit, Event)
local choix_sorts_20045 = math.random(0, 1)
if choix_sorts_20045 == 0 then
pUnit:RegisterEvent('spell0_20045', 1, 1)
end
if choix_sorts_20045 == 1 then
pUnit:RegisterEvent('spell1_20045', 1, 1)
end
end

function mob20045_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20045', math.random(1500, 3000), 1)
end

function mob20045_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20045_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20045_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20045, 1, 'mob20045_Action')
RegisterUnitEvent(20045, 2, 'mob20045_Leave')
RegisterUnitEvent(20045, 3, 'mob20045_Kill')
RegisterUnitEvent(20045, 4, 'mob20045_Die')
